package wan.moneybook.dao;

import java.sql.SQLException;

import wan.moneybook.bean.Account;

public class AccountDao extends Dao {

	public Account getAccount(String id) {
		try {
			return (Account)sqlMap.queryForObject("getAccount");
		} catch (SQLException e) {
			throw new RuntimeException("Error DAO class. Cause:" + e);
		}
	}

	public void addAccount(Account account) {
		try {
			sqlMap.insert("addAccount", account);
		} catch (SQLException e) {
			throw new RuntimeException("Error DAO class. Cause:" + e);
		}
	}
}
